<?php
require_once '../config.php';
require_once '../db/get/user.php';
require_once '../util/msg.php';
require_once '../util/redirect.php';
require_once '../util/user.php';

handleLogin();

function handleLogin() {

  if( is_string($_POST['user']) && is_string($_POST['pass']) ) {
    if( !login($_POST['user'],$_POST['pass']) ) 
      echo 'BREAKAGE';
  }

  // XXX redirect to previous logged in page.
  sendback();
}



?>
